package com.frxuexi.park2212.fragment

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.alibaba.android.arouter.launcher.ARouter
import com.blankj.utilcode.util.SPUtils
import com.frxuexi.lib_base.base.BaseViewFragment
import com.frxuexi.lib_base.net.Const
import com.frxuexi.park2212.R
import com.frxuexi.park2212.databinding.FragmentMyBinding


class MyFragment : BaseViewFragment<FragmentMyBinding>() {
    override fun initData() {

    }

    override fun initView() {
        binding.mychange.setOnClickListener {
            SPUtils.getInstance().apply { 
                remove(Const.UID)
                remove(Const.USERNAME)
                remove(Const.TOKEN)
                remove(Const.ROLE)
            }
            ARouter.getInstance().build("/app/LoginActivity").navigation()
        }
        binding.myUname.setText(SPUtils.getInstance().getString(Const.USERNAME,""))

        binding.mychargeIv.setOnClickListener {
            ARouter.getInstance().build("/app/PayListActivity").navigation()
        }
        binding.mycharge.setOnClickListener {
            ARouter.getInstance().build("/app/PayListActivity").navigation()
        }
        binding.mybill.setOnClickListener {
            ARouter.getInstance().build("/app/MyBillActivity").navigation()
        }
        binding.mybillIv.setOnClickListener {
            ARouter.getInstance().build("/app/MyBillActivity").navigation()
        }
        binding.myfav.setOnClickListener {
            ARouter.getInstance().build("/app/MyAskActivity").navigation()
        }
        binding.myfavIv.setOnClickListener {
            ARouter.getInstance().build("/app/MyAskActivity").navigation()
        }
    }


}